#!/bin/sh
# This script will upload all local images to a registry server ($registry is the default value).
# Usage: push_all
# Author: Mongo
# Create: 2016-05-26
# Change Author happykala
# Change Date 2018-05-15
# Change Log 修改了其中上传镜像指定镜像的脚本文件的名称
# File Use description 当前这个文件最好放在linux的可执行文件目录下，这里已ubuntu为例
# 路径是'/usr/local/bin',然后为本文件添加可执行的权限chmod a+x /usr/local/bin/pushall.sh
# 这样之后就可以使用这个文件批量上传所有镜像数据了
for image in `sudo docker images|grep -v "REPOSITORY"|grep -v "<none>"|awk '{print $1":"$2}'` 
do
    ./push_image.sh $image
done